package com.chiao.service.admin;

import com.chiao.dao.admin.EmployeeDao;
import com.chiao.entity.admin.Employee;
import java.util.List;
import java.util.Map;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class EmployeeService {

    @Autowired
    EmployeeDao empdao;

    public List<Map<String, Object>> queryEmp(int start, int limit, String param) {
        return empdao.queryEmployee(start, limit, param);
    }

    public int countEmployee(String param) {
        return empdao.countEmployee(param);
    }

    public int countEmployeeByDept(int deptid) {
        return empdao.countEmployeeByDept(deptid);
    }

    public List<Map<String, Object>> queryEmpByDept(int start, int limit, int deptid) {
        return empdao.queryEmpByDept(start, limit, deptid);
    }

    public int addEmp(Employee m) {
        return empdao.addEmp(m);
    }

    public int updateEmp(Employee e) {
        return empdao.updateEmp(e);
    }

    public int deleteEmpByIds(String ids) {
        return empdao.deleteEmpByIds(ids);
    }

    public Employee queryEmpByEmpno(String empno) {
        return empdao.queryEmpByEmpno(empno);
    }
}
